#include <stdio.h>

int main()
{

    int arr[5] = {11, 22, 33, 44, 55};

    printf("arr[0]=%d\n", arr[0]);
    printf("arr[1]=%d\n", arr[1]);
    printf("arr[2]=%d\n", arr[2]);
    printf("arr[3]=%d\n", arr[3]);
    printf("arr[4]=%d\n", arr[4]);

    printf("================\n");

    for (int i = 0; i < 5; i++)
    {
        printf("for arr[%d]=%d\n", i, arr[i]);
    }

    printf("================\n");
    printf("arr[5]=%d\n", arr[5]); // 数组越界 值不可预期


    arr[2] = 333;
    printf("================\n");
    for (int i = 0; i < 5; i++)
    {
        printf("for arr[%d]=%d\n", i, arr[i]);
    }

    /* 遍历修改数组的每一项元素 */
    printf("================\n");
    for (int i = 0; i < 5; i++)
    {
        arr[i] *= 2;
    }

    printf("================\n");
    for (int i = 0; i < 5; i++)
    {
        printf("for arr[%d]=%d\n", i, arr[i]);
    }

    printf("================\n");
    printf("arr d=%d\n", arr);
    printf("arr u=%u\n", arr);
    printf("arr p=%p\n", arr);
    // arr在表达式中 代表的是数组的指针地址（内存的地址） ？
    return 0;
}